Programming with TOY(FD)
نویسندگان
چکیده
In [1] we presented the language T OY(FD) that integrates the best features of existing functional and logic languages, as well as finite domain (FD) constraint solving. We believe that T OY(FD) is more flexible and expressive than the existing approaches of constraint logic programming on finite domain (CLP (FD) ) as it integrates FD constraint solving, lazy evaluation, higher order applications of functions and constraints, polymorphism, type checking, composition of functions (and, in particular, constraints), combination of relational and functional notation, and a number of other characteristics. These features allow to write more concise programs, therefore increasing the expressivity level. From an implementation point of view, T OY(FD) integrates the higher-order lazy functional logic language T OY and the efficient FD constraint solver of SICStus Prolog. From a programming point of view, T OY(FD) is the first constraint functional logic programming system that provides a wide set of FD constraints comparable to existing CLP (FD) systems and which is competitive with them. T OY(FD) supports relational constraints including equality, disequality, arithmetical operators on constraints, a wide set of well-known global constraints (e.g., all different/1), membership constraints (e.g., domain/3), propositional constraints, and enumeration constraints (e.g., labeling/2, with a number of strategies) with optimization. T OY(FD) also provides a glass box approach via a set of predefined functions called reflection constraints that allow, at runtime, to recover internal information about the constraint solving process. These functions increase the flexibility of the language as they allow the user to construct specific constraint mechanisms such as new search strategies. Generally speaking, T OY(FD) is, from its nature, different to all existing CLP (FD) languages as its operational mechanism is the result of combining the operational methods of logic languages (i.e., unification and resolution) and functional languages (i.e., rewriting). Thus, T OY(FD) is an alternative to CLP (FD) languages and allows a flexible modelling and quick prototyping at a very high level that cannot be reached by most of the existing constraint systems. T OY(FD) is freely available in http://toy.sourceforge.net/.
منابع مشابه
Toy(FD): Sketch of Operational Semantics
In [2] we proposed the integration of finite domain (FD) constraints into the functional logic programming language TOYand, as result, presented the language TOY(FD) . We showed that TOY(FD) integrates the best features of existing functional and logic languages into FD constraint solving. This paper describes a sketch (due to space limitations) of the TOY(FD) operational semantics that consist...
متن کاملSolving Combinatorial Problems with a Constraint Functional Logic Language
This paper describes a proposal to incorporate nite domain constraints in a functional logic system. The proposal integrates functions, higher-order patterns, partial applications, non-determinism, logical variables, currying, types, lazyness, domain variables, constraints and nite domain propagators. The paper also presents TOY(FD), an extension of the functional logic language TOY that provid...
متن کاملOptimal Placement of Acoustic Sources in a Built-up Area using CLP (FD)
In this paper we face the problem of covering a physical area with acoustic signals emitted by different sources, and we present a declarative and effective solution based on Constraint Logic Programming over Finite Domains. After a testing phase on toy examples, we have successfully applied the code to the solution of a real-world placement problem.
متن کاملA Hybrid Heuristic Algorithm to Solve Capacitated Location-routing Problem With Fuzzy Demands
In this paper, the capacitated location-routing problem with fuzzy demands (CLRP-FD) is considered. The CLRP-FD is composed of two well-known problems: facility location problem and vehicle routing problem. The problem has many real-life applications of which some have been addressed in the literature such as management of hazardous wastes and food and drink distribution. In CLRP-FD, a set of c...
متن کاملAkl(fd) { a Concurrent Language for Fd Programming Akl(fd) { a Concurrent Language for Fd Programming
We consider a complete implementation of an extension of the nite domain constraint system FD, including antimonotone constraints, and its integration in AKL, a deep-guard concurrent constraint language. We present the language AKL(FD), together with associated programming techniques. In particular, we show how powerful symbolic constraints can be deened as AKL(FD) programs, which is partly mad...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2005